﻿using UnityEngine;
using System.Collections;
public enum STATE
{
    First,
    Third
}
public class CameraControll : MonoBehaviour {

    private STATE state = STATE.Third;


    public STATE State
    {
        get { return state; }
        set
        {
            if (state != value)
            {
                if(value == STATE.First)
                {
                    transform.localPosition = new Vector3(0, 0.85f, 0.091f);
                    transform.localEulerAngles = new Vector3(3.81f, 1.51f, 0);
                }
                else
                {
                    transform.localPosition = new Vector3(0.019f, 1.23f, -5.32f);
                    transform.localEulerAngles = new Vector3(26.33f, 359.72f, 0);
                }

                state = value;
            }
        }
    }
    void Update()
    {
        if(Input.GetKeyDown(KeyCode.Space))
        {
            if (State == STATE.First) State = STATE.Third;
            else State = STATE.First;
        }
    }
}
